package com.learning.jquizenglish.common.adapter;

import java.util.ArrayList;

import android.app.Activity;

import com.learning.jquizenglish.model.AnswerModel;

public abstract class BaseQuizAnswerAdapter extends BaseListAdapter<AnswerModel> {

	public boolean isAnswered = false;
	
	public BaseQuizAnswerAdapter(Activity activity, ArrayList<AnswerModel> datas) {
		super(activity, datas);
	}
	
	public void chooseAnswer(int pos){
		getItem(pos).isChoise = true;
		isAnswered = true;
		notifyDataSetChanged();
	}
	
	public boolean checkAnswer(int pos){
		if(getItem(pos).is_correct.trim().equals("1")){
			return true;
		}
		return false;
	}

}
